<script setup>
import { ref, defineExpose } from 'vue';

const date = ref()

const returnDate = () => { 
  date.value = new Date().getTime()
}
returnDate()

// 暴露方法给父组件
defineExpose({
  returnDate
});
</script>

<template>
  <div class="">{{ date }}</div>
</template>

<style lang="less" scoped></style>
